#!/bin/bash

# build branch
remote_branch=$1

# make version
dist_name=EttaM1-$(bash version.sh --output-file=../version.h)

# build
bash build.sh $dist_name || { echo "build fail."; exit 1; }

# test
bash runtest.sh $dist_name || { echo "runtest fail."; exit 2; }

# build package
bash makeinstall.sh $dist_name || { echo "makeinstall fail."; exit 3; }

# upload
bash upload.sh $dist_name $remote_branch || { echo "upload fail."; exit 4; }
